package com.sooth.system.post.mapper;

import com.dream.system.annotation.Mapper;
import com.dream.system.annotation.Param;
import com.dream.system.annotation.Sql;
import com.sooth.system.post.view.SysPostVo;

import java.util.List;

@Mapper
public interface SysPostMapper {
    @Sql("""
            SELECT
            	@*(sys_post)
            FROM
            	sys_post
            	INNER JOIN sys_user_post ON sys_user_post.post_id = sys_post.id
            WHERE
            	sys_user_post.user_id =:userId
            """)
    List<SysPostVo> queryPostByUserId(@Param("userId") Long userId);
}
